<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jquery.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            width: 100px;
            height: 100px;
            background-color: red;
            position: absolute;
            left: 0;
            top: 0;
          
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <script>
        $(function() {
            $(document).mousemove(function(e) {
                console.log(e);
                $(".box").css({
                    left: e.pageX - 50,
                    top: e.pageY - 50
                })
            })
        })
    </script>
</body>
</html>